﻿using Xejen.Hosting;
using System;
using System.Collections.Generic;
using System.Text;

namespace Xejen.Ipc.Framework.Extensions
{
    /// <summary>
    /// 针对<see cref="IAppHost"/>进行扩展
    /// </summary>
    /// <creator>marc</creator>
    public static class AppHostExtensions
    {
        /// <summary>
        /// 启用工业控制流程
        /// </summary>
        /// <param name="host"></param>
        /// <param name="configure"></param>
        /// <returns></returns>
        public static IAppHost UseIpc(this IAppHost host, Action<IIpcBuilder> configure)
        {
            IpcBuilder builder = new IpcBuilder(host);
            configure?.Invoke(builder);
            return host;
        }
    }
}
